<?php
    include("../Batch/SynchronizeDownOne.php");

    $memberId = $_GET['memberId'];
    $SyncObj = new SynchronizeDownOne($memberId);
    $SyncStatus = $SyncObj->Down();
    if($SyncStatus == 1)
    {
        //同期済み設定
        $query = "UPDATE member SET sync=1 WHERE ";
        $query .= "memberId=$memberId";
        $result = mysql_query("$query");
    }
    else
    {
        //同期エラー設定
        $query = "UPDATE member SET sync=3 WHERE ";
        $query .= "memberId=$memberId";
        $result = mysql_query("$query");

        echo date("Y-m-d H:i:s")."　エラーが発生しました。バッチ終了。";
    }
?>
